<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateQualityTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('quality', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('action_no');
			$table->string('quality_no')->nullable();
			$table->dateTime('issue_date');
			$table->string('product_no')->nullable();
			$table->text('product_desc')->nullable();
			$table->string('ship_no')->nullable();
			$table->text('status_update')->nullable();
			$table->integer('lot_quantity')->nullable();
			$table->integer('Sample_size')->nullable();
			$table->integer('defects')->nullable();
			$table->float('reject_rate', 10, 0)->nullable()->default(0);
			$table->string('quantity_in_inventory')->nullable();
			$table->string('quantity_in_process')->nullable();
			$table->text('containment_desc')->nullable();
			$table->string('acknowledge_by')->nullable();
			$table->dateTime('acknowledge_date')->nullable();
			$table->string('verified_for_closure_by')->nullable();
			$table->dateTime('verification_date')->nullable();
			$table->boolean('valid')->default(1);
			$table->integer('project');
			$table->integer('order')->nullable()->default(-1);
			$table->timestamps();
			$table->softDeletes();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('quality');
	}

}
